<template>
  <div class="home">
    <Header />
    
    <main class="main-content">
      <div class="container">
        <!-- 欢迎区域 -->
        <section class="welcome-section">
          <h1 class="welcome-title">
            欢迎使用 File To Code
          </h1>
          <p class="welcome-subtitle">
            安全、便捷的文件传输平台
          </p>
        </section>
        
        <!-- 公告提示 -->
        <section class="notice-section">
          <div class="notice">
            <div class="notice-icon">⚠️</div>
            <div class="notice-content">
              <strong>请注意：</strong>本平台存储的文件均由用户上传，并非来自站长，下载前请仔细确认文件安全性，避免恶意文件带来的风险。
            </div>
          </div>
        </section>
        
        <!-- 核心功能卡片 -->
        <section class="features-section">
          <h2 class="section-title">核心功能</h2>
          <div class="feature-cards">
            <router-link to="/storage" class="feature-card feature-card-primary">
              <div class="feature-icon">📦</div>
              <h3 class="feature-title">文件货柜</h3>
              <p class="feature-desc">永久存储您的重要文件，支持密钥保护，安全可靠</p>
              <div class="feature-badge">永久存储</div>
            </router-link>
            
            <router-link to="/transfer" class="feature-card feature-card-secondary">
              <div class="feature-icon">🚀</div>
              <h3 class="feature-title">文件速递</h3>
              <p class="feature-desc">快速传输临时文件，支持次数和时间限制</p>
              <div class="feature-badge">临时传输</div>
            </router-link>
          </div>
        </section>
        
        <!-- 特点介绍卡片 -->
        <section class="highlights-section">
          <h2 class="section-title">平台特点</h2>
          <div class="highlight-cards">
            <div class="highlight-card">
              <div class="highlight-icon">🔒</div>
              <h3 class="highlight-title">安全传输</h3>
              <p class="highlight-desc">文件传输过程加密处理，保护您的数据安全</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">⏰</div>
              <h3 class="highlight-title">灵活存储</h3>
              <p class="highlight-desc">支持多种存储时效选择，满足不同场景需求</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">🎯</div>
              <h3 class="highlight-title">简单易用</h3>
              <p class="highlight-desc">界面简洁直观，操作流程清晰，上手即用</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">🔑</div>
              <h3 class="highlight-title">密钥保护</h3>
              <p class="highlight-desc">永久存储文件支持密钥管理，确保文件安全</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">📊</div>
              <h3 class="highlight-title">次数控制</h3>
              <p class="highlight-desc">临时文件可设置下载次数限制，防止滥用</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">⚡</div>
              <h3 class="highlight-title">快速响应</h3>
              <p class="highlight-desc">高性能服务器支持，快速上传下载体验</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">💾</div>
              <h3 class="highlight-title">海量存储</h3>
              <p class="highlight-desc">平台提供高达20TB的存储空间，轻松满足您的大文件存储需求</p>
            </div>
            
            <div class="highlight-card">
              <div class="highlight-icon">🌐</div>
              <h3 class="highlight-title">免注册使用</h3>
              <p class="highlight-desc">无需注册账号，打开即用，支持多设备访问，随时随地管理文件</p>
            </div>
          </div>
        </section>
      </div>
    </main>
    
    <Footer />
  </div>
</template>

<script>
import Header from '@/components/Header.vue'
import Footer from '@/components/Footer.vue'

export default {
  name: 'Home',
  components: {
    Header,
    Footer
  }
}
</script>

<style scoped>
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 40px 0 80px;
}

.welcome-section {
  text-align: center;
  margin-bottom: 40px;
  padding: 60px 20px;
}

.welcome-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--text-link) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
}

.notice-section {
  margin-bottom: 60px;
}

.notice {
  display: flex;
  gap: 16px;
  padding: 20px;
  background-color: rgba(210, 153, 34, 0.1);
  border: 1px solid var(--warning-color);
  border-left: 4px solid var(--warning-color);
  border-radius: 8px;
}

.notice-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.notice-content {
  color: var(--text-primary);
  line-height: 1.6;
}

.section-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 32px;
  text-align: center;
}

.features-section {
  margin-bottom: 80px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.feature-card {
  position: relative;
  padding: 40px 32px;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--text-link));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.highlights-section {
  margin-bottom: 60px;
}

.highlight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.highlight-card {
  padding: 32px 24px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.highlight-card:hover {
  border-color: #8b949e;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.highlight-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.highlight-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.highlight-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .welcome-title {
    font-size: 32px;
  }
  
  .welcome-subtitle {
    font-size: 16px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .feature-cards,
  .highlight-cards {
    grid-template-columns: 1fr;
  }
}
</style>

